<!--
 * @FilePath: \vue-typescript-admin-template\src\views\dashboard\editor\index.vue
 * @Author: maskMan
 * @Date: 2023-04-09 20:16:27
 * @LastEditTime: 2023-04-17 19:54:27
 * @Reference: 引用方  src\views\dashboard\index.vue
 * @Descripttion: 说明 编辑者首页
-->
<template>
  <div class="dashboard-editor-container">
    <div class="clearfix">
      <!-- 拇指动画头像 -->
      <pan-thumb :image="avatar" style="float: left">
        Your roles:
        <span v-for="item in roles" :key="item" class="info-roles">{{
          item
        }}</span>
      </pan-thumb>
      <!-- githup三角链接 -->
      <github-corner
        style="position: absolute; top: 0px; border: 0; right: 0"
      />
      <div class="info-container">
        <span class="display_name">{{ name }}</span>
        <span style="font-size: 20px; padding-top: 20px; display: inline-block"
          >Editor's Dashboard</span
        >
      </div>
    </div>
    <div>
      <img :src="emptyGif" class="emptyGif" />
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { UserModule } from '@/store/modules/user'
import PanThumb from '@/components/PanThumb/index.vue' // 拇指动画
import GithubCorner from '@/components/GithubCorner/index.vue' // Github三角链接

@Component({
  name: 'DashboardEditor',
  components: {
    PanThumb,
    GithubCorner
  }
})
export default class extends Vue {
  private emptyGif =
    'https://wpimg.wallstcn.com/0e03b7da-db9e-4819-ba10-9016ddfdaed3'

  get name() {
    return UserModule.name
  }

  get avatar() {
    return UserModule.avatar
  }

  get roles() {
    return UserModule.roles
  }
}
</script>

<style lang="scss" scoped>
.emptyGif {
  display: block;
  width: 45%;
  margin: 0 auto;
}

.dashboard-editor-container {
  background-color: #e3e3e3;
  min-height: 100vh;
  padding: 50px 60px 0px;

  .info-roles {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    display: block;
  }

  .info-container {
    position: relative;
    margin-left: 190px;
    height: 150px;
    line-height: 200px;

    .display_name {
      font-size: 48px;
      line-height: 48px;
      color: #212121;
      position: absolute;
      top: 25px;
    }
  }
}
</style>
